#pragma once
#include "Define.h"

namespace Next {

	namespace GameServer
	{
		using namespace Defines;

		namespace Items {

			class CItem
			{
			public:
				unsigned long		uIndex;
				signed char			sSerial;
				signed short		sType;
				unsigned char		uLevel;
				unsigned char		uPart;
				unsigned char		uClass;
				bool				bTwoHands;
				unsigned char		uAttackSpeed;
				unsigned char		uWalkSpeed;
				float				fDamageMin;
				float				fDamageMax;
				unsigned char		bSuccessfulBlocking;
				float				fDefense;
				float				fMagicDefense;
				unsigned char		uSpeed;
				float				fDurability;

				unsigned char		uSpecialNumber;

				typedef struct Special {
					unsigned char	uType;
					unsigned char	uValue;
				}					stSpecial[MAX_ITEM_SPECIAL];

				unsigned char		uRequireStrength;
				unsigned char		uRequireDexterity;
				unsigned char		uRequireEnergy;
				unsigned char		uRequireLevel;

				unsigned char		uRequireClass[MaxPlayerClass];
				unsigned char		uResistance[MAX_RESISTANCE];

				unsigned int		uValue;
				unsigned int		uSellMoney;
				unsigned int		uBuyMoney;

				unsigned char		uSkillOpt;
				unsigned char		uLuckOpt;
				unsigned char		uExcellentOpt;

				unsigned char		uJewelOfLifeOpt;

			public:
				CItem(void);
				~CItem(void);
			};

			__forceinline static unsigned int MAKE_ITEM(unsigned short type, unsigned short index) 
			{
				return (type * MAX_ITEM_INDEX) + index;
			}
		}
	}
}

